package com.xsz.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xsz.entity.Blog;
import com.xsz.entity.User;
import com.xsz.service.BlogService;
import com.xsz.service.UserService;
@RestController
@RequestMapping("blog")
public class BlogController {
	@Resource
	BlogService blogService;
	//http://localhost:9006/jparedis/blog/getById/A55551583065265819
	@RequestMapping("getById/{id}")
	public Blog getBlogById(@PathVariable("id") String id) {
		 return blogService.selectByPrimaryKey(id);
	}
	
	
	
	@RequestMapping("updateByBlog")
	public Blog getBlogById(Blog blog) {
		 return blogService.updateBy(blog);
	}
	

}
